const Router = require('koa2-router')
const router = new Router()

// 微医移动端接口
const controller = require('./app/controller/login')
router.post("/login", controller.login) //登录
router.post("/homeall", controller.homeall) //所有列表
router.post("/orderform", controller.orderform) //订单
router.post("/register", controller.register) //注册
router.post("/code", controller.verificationcode) //验证码
router.post("/updatepassword", controller.updatepassword) //修改密码
router.post("/updateName", controller.updateName) //修改名字
router.post("/classification", controller.classification) //获取分类
router.post("/addimg", controller.addimg) //上传图片到oss
router.post("/updateImg", controller.updateImg) //修改登录图片
router.post("/addDetails", controller.addDetails) //查找详情 通过id

// 微医管理后台接口 
const controllermanage = require('./app/controller/manage')
router.post("/cmsuser", controllermanage.cmsuser) //超级管理员登录
router.post("/doctorlogin", controllermanage.doctorlogin) //医生登录 
// 管理医生页面的增删改查 
router.post("/doctorall", controllermanage.doctorall)//查找所有医生去渲染页面
router.post("/doctoradd", controllermanage.doctoradd)//添加
router.post("/doctordel", controllermanage.doctordel)//删除
router.post("/doctorupdate", controllermanage.doctorupdate)//修改
router.post("/doctorfind", controllermanage.doctorfind)//查找
//审核医生是否同意入驻 
router.post("/doctorauditadd", controllermanage.doctorauditadd)//前台微医点击入驻
router.post("/doctorauditresult", controllermanage.doctorauditresult)//微医点击查看审核结果
router.post("/doctorauditupdate", controllermanage.doctorauditupdate)//后台不同意医生入驻
router.post("/doctorauditpass", controllermanage.doctorauditpass)//后台同意医生入驻
router.post("/doctorauditdel", controllermanage.doctorauditdel)//后台删除要审核的医生记录 
router.post("/doctorauditfind", controllermanage.doctorauditfind)//后台审核调用渲染的接口 
//文章管理 
const controllerarticle = require('./app/controller/article')
router.post("/articlecha", controllerarticle.articlecha)// 管理员渲染所有文章列表 
router.post("/doctorarticle", controllerarticle.doctorarticle)// 医生渲染所有文章列表 
router.post("/doctoraddarticle", controllerarticle.doctoraddarticle)//  医生登录后新增自己的文章
router.post("/doctordeletearticle", controllerarticle.doctordeletearticle)//  删除文章
module.exports = router